package cn.lutu.lutu.security;

import lombok.Data;
import lombok.Getter;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

@Getter
public class CustomUserDetails extends User {

    private Long id;
    private String nickName;
    private String imgUrl;
    private Integer points;
    private String level;
    private String email;

    public CustomUserDetails(Long id,String nickName,String email,String imgUrl,String userName, Integer points,String level,String password, Collection<? extends GrantedAuthority> authorities) {
        super(userName, password, authorities);
        this.id = id;
        this.nickName = nickName;
        this.imgUrl=imgUrl;
        this.points=points;
        this.level=level;
        this.email=email;

    }
}
